package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Great;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GreatMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Great record);

    Great selectByPrimaryKey(Long id);

    List<Great> selectAll();

    //int updateByPrimaryKey(Great record);

    Great selectByUserIdAndTreaveId(@Param("userId") Long userId, @Param("treavelId") Long treavelId);

    void deleteGreat(@Param("userId") Long userId, @Param("trevelId") Long trevelId);

    void updateState(@Param("authorId") Long authorId, @Param("isread") int isread);

    void updateCommentState(@Param("authorId") Long authorId, @Param("state") int state);
}